package com.example.doudou.demos.pojo.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.format.annotation.DateTimeFormat;
import javax.annotation.PostConstruct;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author fangtao
 * @Date 2023 11 09 11 29
 * 作为查询统一基础类
 **/
@Data
public class BaseEntityVo implements Serializable {

    @Value("${example.defaultNumber:1}")
    private Long pageNumber;

    @Value("${example.defaultNumber:15}")
    private Long pageLimit;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    public BaseEntityVo(){
        this.pageNumber = 1L;
        this.pageLimit = 15L;
    }

}

